package examlab.polimorfismo;

interface XInterface {

    public abstract void runDemo();
}

abstract class XClass implements XInterface {

    String s = "Java";

    @Override
    public abstract void runDemo();

    {
        s = "C++";
    }
}

public class YClass extends XClass implements XInterface {

    {
        s = "C#";
    }

    @Override
    public void runDemo() {
        System.out.println("Demo" + super.s);
    }

    public static void main(String args[]) {
        XInterface xi = new YClass();
        xi.runDemo();
    }
}